package cn.strutsDemo.action;

import com.opensymphony.xwork2.Action;

import java.util.ArrayList;
import java.util.List;

public class ListAction implements Action {
    private List<String> list=new ArrayList<String>();

    public List<String> getList() {
        return list;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    @Override
    public String execute() throws Exception {
        this.getList().add("jack");
        this.getList().add("rose");
        this.getList().add("tom");
        this.getList().add("jerry");
        return "success";
    }
}
